package locations.actions;

import com.opensymphony.xwork2.ActionSupport;
import locations.dao.implement.UserDAOHibernateJPA;
import locations.model.Usuario;

public class EditUserAction extends ActionSupport{

    private static final long serialVersionUID = 1L;
    private Long id;
    private Usuario user;


    @Override
    public String execute() throws Exception {
            UserDAOHibernateJPA dao = new UserDAOHibernateJPA();
            this.setUser(dao.retrieveById(this.getId()));
            return SUCCESS;
    }
    public Long getId() {
            return id;
    }
    public void setId(Long id) {
            this.id = id;
    }
    public static long getSerialversionuid() {
            return serialVersionUID;
    }

    public Usuario getUser()
    {
        return user;
    }

    public void setUser(Usuario user)
    {
        this.user = user;
    }

}
